package hibernate.billStream;

import java.util.*;

public class BillState {
	private String name;
	private BillState(String n){
		name=n;
	}
	private static BillState payed=new BillState("PAYED");
	private static BillState bad=new BillState("BAD");
	private static BillState unsettled=new BillState("UNSETTLED");
	private static BillState active=new BillState("ACTIVE");
	private static BillState upbiding=new BillState("UPBINDING");
	
	public String toString(){
		return name;
	}
	
	public static BillState getPayed(){
		return payed;
	}
	public static BillState getBad(){
		return bad;
	}
	public static BillState getUnsettled(){
		return unsettled;
	}
	public static BillState getActive(){
		return active;
	}
	public static BillState getUpBiding(){
		return upbiding;
	}
	
	public static BillState getRandomState(){
		int i=new Random().nextInt(5);
		switch(i){
		case 0:
			return payed;
		case 1:
			return bad;
		case 2:
			return unsettled;
		case 3:
			return active;
		default:
			return upbiding;
		}
	}
}
